package com.lldpet.spring.cloud.demo.price.client.event;

import org.springframework.cloud.bus.event.RemoteApplicationEvent;

import java.io.Serializable;

/**
 * @desc：PriceUpdateEvent
 * @author: guanliang.xue
 * @date: 2021/5/8 18:33
 * @version:
 * @since:
 */
public class PriceUpdateEvent extends RemoteApplicationEvent implements Serializable {

    /**
     * goodsId
     */
    private String goodsId;

    /**
     * 用户Id
     */
    private String userId;

    public PriceUpdateEvent() {
    }

    public PriceUpdateEvent(String goodsId, String userId) {
        this.goodsId = goodsId;
        this.userId = userId;
    }

    public PriceUpdateEvent(Object source, String originService, String destinationService, String goodsId, String userId) {
        super(source, originService, destinationService);
        this.goodsId = goodsId;
        this.userId = userId;
    }

    public PriceUpdateEvent(Object source, String originService, String goodsId, String userId) {
        super(source, originService);
        this.goodsId = goodsId;
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "PriceUpdateEvent{" +
                "goodsId='" + goodsId + '\'' +
                ", userId='" + userId + '\'' +
                '}';
    }
}
